package riven.club.util;

import java.math.BigDecimal;

/**
 * @author 陈浩
 * @date 2021-10-28 16:46
 */
// files/FileSystemDemo.java

public class FileSystemDemo {
//    static void show(String id, Object o) {
//        System.out.println(id + ": " + o);
//    }


//    public static void main(String[] args) {
//        System.out.println(System.getProperty("os.name"));
//        FileSystem fsys = FileSystems.getDefault();
//        for(FileStore fs : fsys.getFileStores()) {
//            show("File Store", fs);
//        }
//        for(Path rd : fsys.getRootDirectories()) {
//            show("Root Directory", rd);
//        }
//        show("Separator", fsys.getSeparator());
//        show("UserPrincipalLookupService",
//                fsys.getUserPrincipalLookupService());
//        show("isOpen", fsys.isOpen());
//        show("isReadOnly", fsys.isReadOnly());
//        show("FileSystemProvider", fsys.provider());
//        show("File Attribute Views",
//                fsys.supportedFileAttributeViews());
//    }


    public static void main(String[] args) {

        BigDecimal bigDecimal1 = new BigDecimal(0.1);
        BigDecimal bigDecimal = new BigDecimal("0.1");
        System.out.println(bigDecimal);
        System.out.println(bigDecimal1);
        System.out.println(bigDecimal.compareTo(bigDecimal1));
    }
}
/* 输出:
Windows 10
File Store: SSD (C:)
Root Directory: C:\
Root Directory: D:\
Separator: \
UserPrincipalLookupService:
sun.nio.fs.WindowsFileSystem$LookupService$1@15db9742
isOpen: true
isReadOnly: false
FileSystemProvider:
sun.nio.fs.WindowsFileSystemProvider@6d06d69c
File Attribute Views: [owner, dos, acl, basic, user]
*/
